import { Component, OnInit, Input } from '@angular/core';
import { PageBlock } from '../../services/mypage.service';

@Component({
  selector: 'page-block',
  templateUrl: './page-block.component.html',
  styleUrls: ['./page-block.component.scss']
})
export class PageBlockComponent implements OnInit {

  constructor() { }
  edit:boolean = false;
  @Input() block?: PageBlock;

  ngOnInit(): void {
  }
  showEdit() {
    this.edit = true;    
  }
  showView() {
    this.edit = false;
  }
  save(){
    console.log(this.block?.body);
  } 
}
